package cn.com.cym.gamezao.repository.authorize;

import cn.com.cym.gamezao.base.BaseRepository;
import cn.com.cym.gamezao.entity.authorize.User;
import cn.com.cym.gamezao.entity.authorize.UserInfo;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.redis.core.RedisHash;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@RedisHash
@Repository
public interface UserInfoRepository extends BaseRepository<UserInfo,Long> {

    @Query("from UserInfo where deleted=:deleted")
    List<UserInfo> findAllByDeleted(@Param("deleted") Boolean deleted);

    List<UserInfo> findByUser(User user);
}
